home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / program / amos / amoslist.lzh / AMOSLIST / 000280_amos-request@svcs1.digex.net_Wed Sep 20 09:05:15 1995.msg < prev    next >
Internet Message Format  |  1995-10-02  |  3KB

  1. Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224]) by mail1.access.digex.net (8.6.12/8.6.12) with ESMTP id JAA09982;  for <mcox@access.digex.net> ; Wed, 20 Sep 1995 09:05:14 -0400
  2. Received: (from daemon@localhost) by svcs1.digex.net (8.6.12/8.6.12) id HAA07151 for amos-out; Wed, 20 Sep 1995 07:18:51 -0400
  3. Received: from mail1.access.digex.net (mail1.access.digex.net [205.197.247.2]) by svcs1.digex.net (8.6.12/8.6.12) with ESMTP id HAA07148 for <amos-list@svcs1.digex.net>; Wed, 20 Sep 1995 07:18:50 -0400
  4. Received: from disperse.demon.co.uk (disperse.demon.co.uk [158.152.1.77]) by mail1.access.digex.net (8.6.12/8.6.12) with SMTP id HAA02440;  for <amos-list@access.digex.net> ; Wed, 20 Sep 1995 07:18:42 -0400
  5. Received: from post.demon.co.uk by disperse.demon.co.uk id aa28765;
  6.           20 Sep 95 12:11 +0100
  7. Received: from westmead.demon.co.uk by post.demon.co.uk id aa07464;
  8.           20 Sep 95 12:09 +0100
  9. From: Mark Carter <Mark@westmead.demon.co.uk>
  10. Organization:  None Whatsoever
  11. To: amos-list@access.digex.net
  12. Date:          Wed, 20 Sep 1995 11:28:25 +0000
  13. Subject:       Re: Bits and Pieces (fwd)
  14. Priority: normal
  15. X-mailer: Pegasus Mail/Windows (v1.22)
  16. Message-ID:  <9509201209.aa07464@post.demon.co.uk>
  17. Status: RO
  18. X-Status: 
  19.  
  20. > Greetings Mark, you wrote some text on the subject Re: Bits and Pieces, and
  21. > now I'm going to answer it.
  22. > MC> > Use banks to store data like that... it'll take less memory and will be
  23. > MC> > much neater...
  24. > MC> > 
  25. > MC> 
  26. > MC> Hmmn, I'm not so sure ;-)
  27. > MC> 
  28. > MC> The difference in memory would be about 20K - and I'm willing to 
  29. > MC> sacrafice that for what I think is the neater method.
  30. > MC> 
  31. > MC> At the moment I read in all the stats (at the begining of the 
  32. > MC> program) from a data bank that I have set up.  
  33. > MC> 
  34. > MC> Say, I have 10 teams with 20 players in each and each player has 10 
  35. > MC> stats (assume all 2 byte integers). Reading a stat from the Data 
  36. > MC> Bank, I would have to do something like:
  37. > MC> 
  38. > MC>       Result=Deek(Start(Bank)+400*Team+20*Player+2*Statnum)
  39. > MC> 
  40. > MC> Actually, it would be much worse this because I have so many 
  41. > MC> different types of stats that I would need to store pointers for 
  42. > MC> where each type of stat is in the bank - this would take up even more 
  43. > MC> memory and would be very untidy.
  44. > MC> 
  45. > MC> Compare this to loading all data from the bank into arrays. Then all 
  46. > MC> I would have to do to access a stat is
  47. > MC> 
  48. > MC>      Result=Statistic(Player,Team,Statnum)
  49. > MC> 
  50. > MC> Much nicer, dont you agree.....?
  51. > I guess so... but how about this:
  52. > Def fn _RESULT(Player,Team,Statnum)=Deek(Start(Bank)+400*Team+20*Player+2*Statnum)
  53. > Result=Fn_RESULT(Player,Team,Statnum)
  54. > Which would be neat-ish...
  55.  
  56. Nice idea - I like it!..... although I hate using Def fn - you cant 
  57. hide them away like normal procedures.
  58.  
  59. But (and theres always a but), as I said earlier I have lots of different 
  60. types of stats ans skills - it would be too awkward to lump all the 
  61. strings in one array and all the integers in another.  Therefore, I 
  62. need to stick with using the 30 arrays - which translates to 30 Def 
  63. fns - yuk :-(
  64.  
  65. I could just use it for the big arrays I only use now and again, 
  66. though - thanx Ben.
  67.  
  68. Cheers,
  69.  
  70. Mark
  71.  
  72. Mark Carter
  73. e-mail: mark@westmead.demon.co.uk,   exet0007@sable.ox.ac.uk